package com.kclm.se.enums;

public class UseGender {

	public static void main(String[] args) {
		//
		Gender g1 = Gender.MALE;
		Gender g2 = Gender.FEMALE;
		//
		System.out.println(g1); //相当于调用了 g1.toString
		System.out.println(g1.name());
		System.out.println(g2.toString());
		System.out.println(g2.name());
		System.out.println("------------------------");
		System.out.println(g1.ordinal());
		System.out.println(g2.ordinal());
		//
		Gender[] arr = Gender.values();
		System.out.println("长度： "+arr.length);
	}
}
